Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented Nov 19, 2024

To keep consistent, a cron job will run in the background to check num_watches. For a big instance, it will become very slow. So I think we can remove the column and query the table when necessary.

@lunny lunny added the type/enhancement An improvement of existing functionality label Nov 19, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 19, 2024
@lunny lunny added this to the 1.23.0 milestone Nov 19, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/migrations labels Nov 19, 2024
@delvh
Copy link
Member

delvh commented Nov 19, 2024

and query the table when necessary

Erm… isn't that
grafik?

If yes, this won't be a performance improvement.
It will instead worsen the performance.

@lunny
Copy link
Member Author

lunny commented Nov 21, 2024

and query the table when necessary

Erm… isn't that grafik?

If yes, this won't be a performance improvement. It will instead worsen the performance.

Yes, but it's a slight additional load. It commonly will only increase by about 1ms for this page. We can also optimize it with cache in future PRs. Why I couldn't do it because introducing cache in this place needs more refactors PR merged first such as #32506 and #32537

@lunny lunny modified the milestones: 1.23.0, 1.24.0 Dec 5, 2024
@lunny lunny marked this pull request as draft December 27, 2024 17:53
@lunny lunny modified the milestones: 1.24.0, 1.25.0 Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/migrations type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants